-
-
Notifications
You must be signed in to change notification settings - Fork 39
refactor: publish releases with limited concurrency #206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: efc0650 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThe pull request modifies the Changes
Assessment against linked issues
Possibly related PRs
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
src/run.tsOops! Something went wrong! :( ESLint: 9.23.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@1stg/eslint-config' imported from /eslint.config.js 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/run.ts (1)
146-151
: LGTM! Good refactoring to sequential release publication.The change from concurrent (likely using
Promise.all
) to sequential release creation is a good approach. Sequential execution can help avoid potential rate limiting issues with GitLab's API and ensures releases are processed in a predictable order. This aligns well with the PR objective to "publish release sequentially" and likely addresses the referenced issue #188.Consider adding a comment explaining why sequential execution is preferred over concurrent execution to help future maintainers understand the design decision:
if (createGitlabReleases) { + // Process releases sequentially to avoid rate limiting and ensure consistent order for (const pkg of releasedPackages) { await createRelease(api, { pkg, tagName: `${pkg.packageJson.name}@${pkg.packageJson.version}`, }) } }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/run.ts
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Codacy Static Code Analysis
This should be opt-in at least. |
|
@codecov-ai-reviewer review |
On it! We are reviewing the PR and will provide feedback shortly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the release process to publish releases with limited concurrency using the p-limit library. Key changes include:
- Importing and using the p-limit library to limit concurrent release operations.
- Wrapping the createRelease call in a concurrency-limited function within Promise.all.
- Updating the changeset to reflect the concurrency refactor.
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/run.ts | Introduces p-limit to constrain concurrent release creation. |
.changeset/ten-eagles-sing.md | Updates the release notes to reflect the concurrency refactor change. |
Files not reviewed (1)
- package.json: Language not supported
Comments suppressed due to low confidence (1)
src/run.ts:27
- [nitpick] Consider replacing the computed expression (2 * 3) with a descriptive named constant (e.g., const CONCURRENCY_LIMIT = 6) to improve clarity.
const limit = pLimit(2 * 3)
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
package.json (1)
88-88
: Critical Dependency Categorization:
Thep-limit
package is now added to thedevDependencies
at line 88. Please verify whether this module is used by production code (for example, in thesrc/run.ts
file as part of the limited concurrency implementation for publishing releases). If it is indeed used at runtime rather than solely in development scripts, it should be moved to thedependencies
section to ensure that it is available when the package is installed.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
📒 Files selected for processing (3)
.changeset/ten-eagles-sing.md
(1 hunks)package.json
(1 hunks)src/run.ts
(3 hunks)
✅ Files skipped from review due to trivial changes (1)
- .changeset/ten-eagles-sing.md
🚧 Files skipped from review as they are similar to previous changes (1)
- src/run.ts
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Analyze (javascript)
- GitHub Check: Codacy Static Code Analysis
@coderabbitai This repository use |
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed:
Length of output: 75859 🏁 Script executed:
Length of output: 10666 @JounQin I apologize for the issue you're experiencing with the ESLint configuration. After investigating your repository setup, I can see the problem:
This is an issue with our review tools not properly resolving dependencies in Yarn v4+ projects. The error I'll report this issue to our engineering team to improve compatibility with Yarn v4+ projects. In the meantime, you have a few options:
Thank you for bringing this to our attention. We'll work on improving our compatibility with modern Yarn workspaces. |
Think it could fix #188
Need to do additional tests on my side
Summary by CodeRabbit
p-limit
, to enhance the release workflow.